package util;

public class Common {
	public static String convertFirstLetterToLowerCase(String s) {
		if (s.length() < 1)
			return "";
		char firstLetter = s.charAt(0);
		if (Character.isLowerCase(firstLetter))
			return s;
		if (Character.isUpperCase(firstLetter)) {
			String result = ((char) (s.charAt(0) + 32)) + s.substring(1);

			return result;
		} else
			return s;
	}

	public static String convertFirstLetterToUpperCase(String s) {
		if (s.length() < 1)
			return "";
		char firstLetter = s.charAt(0);
		if (Character.isUpperCase(firstLetter))
			return s;
		if (Character.isLowerCase(firstLetter)) {
			String result = ((char) (s.charAt(0) - 32)) + s.substring(1);

			return result;
		} else
			return s;
	}
}
